Skip to content

Conversation

@kevinkim-ogp
Copy link
Contributor

@kevinkim-ogp kevinkim-ogp commented Nov 12, 2025

Problem

Plumber’s loop-guard currently uses a simple heuristic: if updatedBy.email is missing, it assumes the change came from an API key/automation and rejects the webhook to avoid infinite loops.

GatherSG’s “Update case → Send webhook” sequence sends:

{
  "updatedBy": {
    "name": "Workflow"
  }
}

No email ⇒ Plumber flags it as automation-originated ⇒ rejected.

Solution

  • Allow the Pipe to execute when its updatedBy.name === 'Workflow' and it contains both createdBy.email and createdBy.name to avoid potential infinite loop where API creates case and triggers an instant workflow back to Plumber

Tests

  • Create a GatherSG workflow with an update case first then send to webhook. Trigger the workflow and verify that Plumber receives the webhook call.
  • Verify that despite this workflow, Plumber can still detect and block infinite loops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants